// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
import Register from '@/views/Register';

// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 商品管理
import Goods from '@/views/goods/Goods';
// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
// 菜单管理

// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';


/**
 * 支付管理
 */
// 支付配置信息
// 支付配置
import Config from '@/views/pay/Config';
import skgl from '@/views/pay/skgl';
import gxgn from '@/views/pay/gxgn';
import myxx from '@/views/pay/jzzxx';
import szdxx from '@/views/pay/szdxx';
import szdlb from '@/views/pay/szdlb';
import ggxx from '@/views/pay/ggxx';
import jzzbd from '@/views/pay/jzzbd';
import xmgl from '@/views/pay/xmgl';
import grxx from '@/views/pay/grxx';
import szzgrxx from '@/views/pay/szzgrxx';
import shzgrxx from '@/views/pay/shzgrxx';
//首页
import HomePage from "@/views/HomePage";
import csxm from "@/views/csxm";
import xxgk from "@/views/xxgk";
import cbax from "@/views/cbax";



/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';

// 启用路由
Vue.use(Router);

// 导出路由 
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: HomePage,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: "/csxm",
        component: csxm
      }, 
      {
        path: "/cbax",
        component: cbax
      },
       
      {
        path: "/xxgk",
        component: xxgk
      },  
    {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/Register',
        name: '注册',
        component: Register,
        hidden: true,
        meta: {
            requireAuth: false
        }
    },
    {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/goods/Goods',
            name: '商品管理',
            component: Goods,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/machine/Machine',
            name: '机器信息管理',
            component: Machine,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/machine/MachineAisle',
            name: '货道信息管理',
            component: MachineAisle,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/szdlb',
            name: '捐助单管理',
            component: Order,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/myxx',
            name: '个人捐助情况',
            component: myxx,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/pay/szzgrxx',
            name: '受助者个人信息',
            component: szzgrxx,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/shzgrxx',
            name: '审核者个人信息',
            component: shzgrxx,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/pay/grxx',
            name: '个人信息',
            component: grxx,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/pay/szdxx',
            name: '受助单详细情况',
            component: szdxx,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/pay/xmgl',
            name: '项目管理',
            component: xmgl,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/pay/Order',
            name: '受助单列表',
            
            component:szdlb ,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/ggxx',
            name: '公告信息',
            component: ggxx,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/jzzbd',
            name: '捐助者榜单',
            component: jzzbd,
            meta: {
                requireAuth: true
            }
        },{
            path: '/system/user',
            name: '用户管理',
            component: user,
            meta: {
                requireAuth: true
            }
        },  {
            path: '/system/Role',
            name: '公告管理',
            component: Role,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Dept',
            name: '公司管理',
            component: Dept,
            meta: {
                requireAuth: true
            }
        },  
        {
            path: '/pay/gxgn',
            name: '共享功能',
            component: gxgn,
            hidden: true,
            meta: {
                requireAuth: false
            }
        }, {
            path: '/pay/Config',
            name: '支付配置',
            component: Config,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/skgl',
            name: '善款管理',
            component: skgl,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/druid/login',
            name: '监控查询',
            component: druidLogin,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/charts/statistics',
            name: '数据可视化',
            component: statistics,
            meta: {
                requireAuth: true
            }
        }]
    }
]
})